
import Vue from 'vue';
import VueRouter from 'vue-router'; //导入路由包
Vue.use(VueRouter); //手动安装

//导入组件
import homeContainer from './components/homeContainer.vue';
import contactContainer from './components/contactContainer.vue';
import shopcarContainer from './components/shopcarContainer.vue';
import gearContainer from './components/gearContainer.vue';
console.log("出来了没有同学们")
1
//新闻咨询
import newslist from './components/news/newslist.vue';
//新闻详情
import newsinfo from './components/news/newsinfo.vue';

//图片分享
import photoslist from './components/photos/photolist.vue';

//图片 详情
import photoinfo from './components/photos/photoinfo.vue';

//商品 页面
import shoplist from './components/shopcars/shoplist.vue';
import goodsinfo from './components/shopcars/goodsinfo.vue';

var router = new VueRouter({  //路由

 routes:[
     {path:'/',redirect:'/home'},
     {path:'/home',component:homeContainer},
     {path:'/contact',component:contactContainer},
     {path:'/shopcar',component:shopcarContainer},
     {path:'/gear',component:gearContainer},
     {path:'/home/newslist',component:newslist},
     {path:'/home/newsinfo/:id',component:newsinfo},
     {path:'/home/photo',component:photoslist},
     { path:'/home/photoinfo/:id',component:photoinfo},
     { path:'/home/shoplist' ,component:shoplist},
     { path:'/home/goodsinfo/:id',component:goodsinfo }
     
 ],
 linkActiveClass:'mui-active' //修改路由的默认高亮
      
})

export default router;  //向外暴露